#include "..\\include\Lib_Clara.h"
#include "..\\include\cfg_items.h"
#include "lang.h"
#include "config_data.h"
#include "conf_loader.h"

void BCFG_Polish(void)
{
  char *hdr;
  hdr = (char*)cfghdr_lang.name;
  strcpy (hdr,PL_LANG);
  hdr = (char*)cfgcbox_lang[0].cbox_text;
  strcpy (hdr,PL_ENGLISH);
  hdr = (char*)cfgcbox_lang[1].cbox_text;
  strcpy (hdr,PL_POLISH);
  hdr = (char*)cfghdr_confpath.name;
  strcpy (hdr,PL_CONFPATH);
  hdr = (char*)cfghdr_keys.name;
  strcpy (hdr,PL_KEYS);
  hdr = (char*)cfghdr_select.name;
  strcpy (hdr,PL_SELECT);
  hdr = (char*)cfghdr_softkeys.name;
  strcpy (hdr,PL_SOFTKEYS);
  hdr = (char*)cfghdr_statusbar.name;
  strcpy (hdr,PL_STATUSBAR);
  hdr = (char*)cfghdr_rungui.name;
  strcpy (hdr,PL_GUIKEY);
  hdr = (char*)cfghdr_animkey.name;
  strcpy (hdr,PL_ANIMKEY);
  hdr = (char*)cfghdr_maininput.name;
  strcpy (hdr,PL_MAININPUT);
  SaveConfigData(successed_config_path,successed_config_name);
}
void BCFG_English (void)
{
  char *hdr;
  hdr = (char*)cfghdr_lang.name;
  strcpy (hdr,EN_LANG);
  hdr = (char*)cfgcbox_lang[0].cbox_text;
  strcpy (hdr,EN_ENGLISH);
  hdr = (char*)cfgcbox_lang[1].cbox_text;
  strcpy (hdr,EN_POLISH);
  hdr = (char*)cfghdr_confpath.name;
  strcpy (hdr,EN_CONFPATH);
  hdr = (char*)cfghdr_keys.name;
  strcpy (hdr,EN_KEYS);
  hdr = (char*)cfghdr_select.name;
  strcpy (hdr,EN_SELECT);
  hdr = (char*)cfghdr_softkeys.name;
  strcpy (hdr,EN_SOFTKEYS);
  hdr = (char*)cfghdr_statusbar.name;
  strcpy (hdr,EN_STATUSBAR);
  hdr = (char*)cfghdr_rungui.name;
  strcpy (hdr,EN_GUIKEY);
  hdr = (char*)cfghdr_animkey.name;
  strcpy (hdr,EN_ANIMKEY);
  hdr = (char*)cfghdr_maininput.name;
  strcpy (hdr,EN_MAININPUT);
  SaveConfigData(successed_config_path,successed_config_name);
}

void UpdateLanguage()
{
  if(language == 0)
    BCFG_English();
  else if (language == 1)
    BCFG_Polish();
}
